package com.xiaoniu.mc.client.message;

import com.xiaoniu.mc.client.constant.SystemConstant;
import com.xiaoniu.mc.client.enums.XmqMessageDelayLevel;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.rocketmq.client.producer.SendCallback;

import java.io.Serializable;

/**
 * @类描述：
 * @创建人：林继丰
 * @创建时间：2017/8/23 22:08
 * @版权：Copyright (c) 深圳市牛鼎丰科技有限公司-版权所有.
 */
public class SendMessageWrapper implements Serializable {
    private static final long serialVersionUID = 9025567149648481871L;

    private String message;

    private String topic;

    private String tags;

    private String keys;

    private SendCallback sendCallback;

    private XmqMessageDelayLevel level;

    private String chartset = SystemConstant.CHART_SET_UTF8;

    private String orderId;

    public SendMessageWrapper(String message, String topic, String tags, String keys, SendCallback sendCallback) {
        this.message = message;
        this.topic = topic;
        this.tags = tags;
        this.keys = keys;
        this.sendCallback = sendCallback;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getKeys() {
        return keys;
    }

    public void setKeys(String keys) {
        this.keys = keys;
    }

    public SendCallback getSendCallback() {
        return sendCallback;
    }

    public void setSendCallback(SendCallback sendCallback) {
        this.sendCallback = sendCallback;
    }

    public XmqMessageDelayLevel getLevel() {
        return level;
    }

    public void setLevel(XmqMessageDelayLevel level) {
        this.level = level;
    }

    public String getChartset() {
        return chartset;
    }

    public void setChartset(String chartset) {
        this.chartset = chartset;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
